<template>
  <div class="demo">
    <h2>学生名称:{{ name }}</h2>
    <h2>学生性别:{{ sex }}</h2>
  </div>
</template>
<script>

export default {
  name: 'Student',

  data: function () {
    return {
      name: 'Tom',
      sex: '男'
    }
  },
  mounted() {
    console.log('Student组件发送数据')
    this.$bus.$emit('hello',{
      'id':'213',
      'name':'456'
    })
  }
};

</script>

<style scoped>
.demo {
  background-color: orange;
  padding: 5px;
  margin-top: 30px;
}

</style>



